<script lang="ts" setup>
import { ref } from 'vue'

import AdvancedTable from '@/components/sofastui/AdvancedTable/AdvancedTable.vue'

import { fields, config } from './constant'

const advancedFormRef = ref()
const advancedTableRef = ref()

// 行展开
const handelRowExpand = (data: { [key: string]: unknown }) => {
  advancedFormRef.value?.show('update', data)
}
</script>

<template>
  <AdvancedTable
    ref="advancedTableRef"
    :fields="fields"
    :config="config"
    @rowExpand="handelRowExpand"
  >
  </AdvancedTable>
</template>
